home *** CD-ROM | disk | FTP | other *** search
- /* Rand-Anneal by an idea of Toffoli, CAMRexx version by THOR */
-
- MakeAlgorithm:
- PLANEALGORITHM neumann hv
- return
-
- MakePlane:
- if plane=0 then; do
- /* anneal-algorithm */
- sum=center+north+south+west+east
- rand=center_ & north_ & south_ & west_ & east_
- if sum<parameters.border-1 then SETPLANE off
- if sum=parameters.border-1 then SETPLANE rand
- if sum=parameters.border then; do
- rand=~rand
- SETPLANE rand
- end
- if sum>parameters.border then SETPLANE on
- end
- /* "random" generator */
- if plane=1 then; do
- rand=(east_ & south_ ) ^ west_ ^ north_ ^ center_
- SETPLANE rand
- end
- return
-